<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="newAjax3.js"></script>
    <script>
        window.onload=function(){
            var oBtn=document.getElementById('btn');
            var url='login.php';
//            url='login.php';
//            login.php?act=xxx&user=xxx&pass=xxx&phone=xxx&num=xxx;

            oBtn.onclick=function(){
                var data=ajax(url,'post','act=login&user=user23&pass=123&phone=121312313&num=2323'+Math.random(),function(str){
                    console.log(str);
                });
            }


        }
    </script>
</head>
<body>
    <input type="button" value="按钮" id="btn">
</body>
</html>